package cn.hsw.platform.model;

import cn.hsw.platform.core.base.BaseConstant;
import cn.hsw.platform.core.base.BaseModel;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.hibernate.annotations.SQLDelete;
import org.hibernate.annotations.SQLDeleteAll;
import org.hibernate.annotations.Where;

import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.Table;
import java.io.Serializable;
import java.util.Date;

/**
 * 角色实体
 *      每个角色可以有多个用户
 * @author 李子木
 */
@EqualsAndHashCode(callSuper = true)
@Data
@Entity
@Table(name = "hsw_manage_role")
@Where(clause = BaseConstant.NOT_DELETE)
@SQLDelete(sql = "update hsw_manage_role" + BaseConstant.DELETE_SQL)
@SQLDeleteAll(sql = "update hsw_manage_role" + BaseConstant.DELETE_SQL)
public class RoleModel extends BaseModel implements Serializable {


    private static final long serialVersionUID = -9118264276065218147L;
    /**
     * 角色名称
     */
    private String name;

    /**
     * 角色编码 生成规则
     *      //系统默认生成两种基本用户角色编码，其它用户 通过雪花算法生成不重复ID即可，没啥用
     */
    private String code;
}
